<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.12/dist/css/bootstrap.min.css" rel="stylesheet" />
  <style>
    .handle {
      display: flex;
      height: 40px;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
  </style>
</head>

<body>
  <div class="container-fluid">
    <div class="row" style="max-width: 1200px; margin: 150px auto">
      <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <div class="handle">
          <h2>管理系统</h2>
          <a class="btn btn-success" href="/students/new" style="margin: 30px 180px 0 0">添加学生</a
            >
          </div>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>id</th>
                  <th>姓名</th>
                  <th>性别</th>
                  <th>年龄</th>
                  <th>学院</th>
                  <th>个人描述</th>
                </tr>
              </thead>
              <tbody>
                {{each students}}
                <tr>
                  <td>{{$value.id}}</td>
                  <td>{{$value.name}}</td>
                  <td>{{$value.gender}}</td>
                  <td>{{$value.age}}</td>
                  <td>{{$value.college}}</td>
                  <td>{{$value.desc}}</td>
                  <td>
                    <a
                      href="/students/edit?id={{$value.id}}"
                      class="btn btn-success"
                      >编辑</a
                    >
                    <a
                      href="/students/delete?id={{$value.id}}"
                      class="btn btn-danger"
                      >删除</a
                    >
                  </td>
                </tr>
                {{/each}}
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>